<?php

namespace Regard\InstituteBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class CategoryType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('title', 'text')
            ->add('picture', 'file', array('data_class' => null,
										'property_path' => 'picture'))
            ->add('superCategory', 'choice', array('choices' => array('epilation' => 'Liste d\'épilations',
																		'soin' => 'Liste de soins',
																		'specs' => 'Liste de soins spécifiques')))
        ;
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'Regard\InstituteBundle\Entity\Category'
        ));
    }

    public function getName()
    {
        return 'regard_institutebundle_categorytype';
    }
}
